package controller;

import model.CoinGameSolverDynamic;
import model.CoinGameSolverRecursive;

/**
 * Executes the CoinGameSolver and prints the results;
 * 
 * @author Karen Berntsen (s0815799)
 * @author Erik Stens (s0615374)
 */
public class AD_exercise_6 {
	public static void main(String[] args) {
		// int[] coins = new int[] { 1, 100, 200, 10, 200, 50, 100, 20, 100, 2, 5, 50, 5, 10, 20, 100, 20, 10, 20, 100, 10, 50, 100, 20, 50, 100, 5, 2, 5, 200 };
		// int[] coins = new int[] { 10, 100, 10, 100, 10 };
		int[] coins = new int[] { 10, 200, 2, 1 };
		
		CoinGameSolverRecursive recursiveSolver = new CoinGameSolverRecursive(coins);
		System.out.println("Minimum value for player 1 using the recursive solver: " + recursiveSolver.solve());
		
		CoinGameSolverDynamic dynamicSolver = new CoinGameSolverDynamic(coins);
		System.out.println("\nMinimum value for player 1 using the dynamic solver: " + dynamicSolver.solve());
		
		System.out.println("\nSolutionMatrix:");
		dynamicSolver.printSolutionMatrix();
		
		System.out.println("\nBest strategy:");
		dynamicSolver.printBestStrategy();
	}
}
